﻿#ifndef BASE64WORKER_H
#define BASE64WORKER_H

#include <QThread>
#include <QFile>

class Base64Worker : public QThread
{
    Q_OBJECT

public:
    explicit Base64Worker(QObject *parent = nullptr);
    void setFileName(const QString &fileName);
    void setTotalSize(qint64 totalSize);
    void setOutputFile(QFile *outputFile);

signals:
    void progressChanged(qint64 processedSize);
    void errorOccurred(const QString &errorMessage);
    void done();
protected:
    void run() override;

private:
    QString m_fileName;
    qint64 m_totalSize;
    QFile *m_outputFile;
};

#endif // BASE64WORKER_H
